<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
export default {
  name: 'app',
  methods: {
    isEmpty (value) {
      return (
        value === undefined ||
        value === null ||
        (typeof value === "object" && Object.keys(value).length === 0) ||
        (typeof value === "string" && value.trim().length === 0)
      )
    }
  },
  created () {
    //刷新后store.js 会清空，需要重新请求数据，目前只在 local 中保存了 code
    // if (localStorage.SET_CODE) {
    //   this.$store.dispatch('set_isAuthorize', !this.isEmpty(localStorage.SET_CODE))
    //   this.$store.dispatch('set_user', localStorage.SET_USER)
    // }
  }
}
</script>
<style>
html,
body,
#app {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}
</style>
